<template>
    <div>
        <h2>App</h2>
        <hr/>
        <Child :no="no" @addNum="fn"></Child>
    </div>
</template>
<script>
import Child from "@/components/Child.vue";
export default {
    name:"App",
    data(){
      return{
          no:0
      }
    },
    components:{
        Child
    },
    methods:{
        fn(num){
            this.no+=num
            console.log(this.no)
        }
    },

}
</script>
<style lang="less">

</style>
